<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
  <link rel="stylesheet" type="text/css" media="all" href="zcode2js.css" />
  <title>zcode2js</title>
<script type="text/javascript" src="../src/lib/jquery.js"></script>
<script type="text/javascript" src="http://parchment.googlecode.com/svn/trunk/base64.js"></script>
<script type="text/javascript" src="zcode2js.js"></script>
</head>
<body>
<h1>zcode2js</h1>
<div id="content">
  <p>One of the minor downsides of having Parchment transparently use
  <tt>zcode.appspot.com</tt> to convert your Z-machine story, as
  described in <a href="zcode.html">zcode</a>, is that it takes
  additional time for the user's browser to ask the web service for
  your story, especially if the web service is overloaded with
  requests.  If you want to improve load time and reliability, you may
  want to consider converting your Z-machine story into a JavaScript
  representation Parchment can understand beforehand.  If you'd like
  to try this, please load your Z-code file in the field below.</p>
  <div class="input"><input id="file-upload" type="file" size="60" /></div>
  <div id="post-file-upload">
    <p>You can download the Javascript version of your story by clicking
    <a id="js-file-download">here</a>.</p>
  </div>
  <div id="post-file-upload-failed">
    <p>My apologies for the inconvenience, but I can't seem to access
    the contents of the file you selected.  You may want to get <a
    href="http://www.getfirefox.com">Firefox 3</a>, which this page is
    guaranteed to work with.</p>
  </div>
  <p>Alternatively, if you like using the command-line, you can use the <a
  href="zcode2js.py">zcode2js.py</a> Python script.</p>
  <p>Once you have the Javascript version of your story, you should
  upload it to a server.  Just make sure the file has a <tt>.js</tt>
  extension and enter the URL to the story in the field below.</p>
  <div class="input"><input id="url-entry" type="text" size="60" /></div>
  <div id="post-url-entry">
    <p>The link for playing your story is:</p>
    <p><a id="play-url"></a></p>
  </div>
</div>
</body>
</html>
